package unit_3;

import java.util.Scanner;
public class Demo03 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        int max = a;
        int min = a;
        if(b > max)
            max = b;
        else if(b < min)
            min = b;
        if(c > max)
            max = c;
        else if(c < min)
            min = c;
        if(d >max)
            max = d;
        else if(d < min)
            min = d;
        System.out.println("最大值："+max);
        System.out.println("最小值："+min);
    }
}
